#include <bits/stdc++.h>
using namespace std;
using uint=unsigned int;
using ll=long long;
using ull=unsigned long long;
using i128=__int128;
const int N=1e6+5;

void solve(){
    
    return;
}

int main(){
    std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr); std::cout.tie(nullptr);
    int n;
    cin>>n;
    int arr[10]={0};
    while(n!=0){
        arr[n%10]++;
        n=n/10;
    }
    if(arr[1]==1&&arr[2]==2&&arr[3]==3)cout<<"Yes"<<endl;
    else cout<<"No"<<endl;

    return 0;
}